﻿using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Data;
using System.Data.OleDb;


/// <summary>
/// Mobile 的摘要说明
/// </summary>
[WebService(Namespace = "http://localhost/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Mobile : System.Web.Services.WebService {

    public Mobile () {

        //如果使用设计的组件，请取消注释以下行 
        //InitializeComponent(); 
    }

    [WebMethod]
    public DataSet getMobile(string mobile)
    {
        try
        {
            // Get the employee details
            string strSql = "SELECT * from list where [num]='" + mobile + "'";
            OleDbConnection objConn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("./") + "Mobile.mdb");
            objConn.Open();
            OleDbDataAdapter dat = new OleDbDataAdapter(strSql, objConn);
            DataSet ds = new DataSet();
            dat.Fill(ds);
            objConn.Close();
            return ds;
        }
        catch (Exception Ex)
        {
            throw Ex;
        }

    }
    
}

